package com.org.web.handle.wechat;

import org.springframework.web.client.RestTemplate;

/**
 * @author devg
 * @Date 2020/3/6 14:27
 */
public class WechatCommon {

  public static final String authUrl = "https://open.weixin.qq.com/connect/oauth2/authorize";

  public static final String accessTokenUrl = "https://api.weixin.qq.com/sns/oauth2/access_token";

  public static final String refreshAccessTokenUrl = "https://api.weixin.qq.com/sns/oauth2/refresh_token";

  public static final String userInfo = "https://api.weixin.qq.com/sns/userinfo";

  public static void main(String args[]){
    RestTemplate restTemplate = new RestTemplate();
    String url = "https://api.weixin.qq.com/sns/userinfo?access_token=31_ngwv7Q05KLmbRaByy24cTTcvyWM6syyNdVeqziL_QzW37sdsGBIWScfMeJm7PoTcy4vRaY1tECbInwcFDwdp3exXoG4_FftJss34eRELAbg&openid=o6dKfs-_XCXX5oDSOLm823CfYP3Y&lang=zh_CN";
    String result = restTemplate.getForObject(url,String.class);
    System.out.println(result);
  }

}
